package com.design.structure.adapter.atguigu.classadapter;

/**
 * @ProjectName: design
 * @Package: com.design.structure.adapter.atguigu.classadapter
 * @ClassName: Phone
 * @Author: shenaiguo
 * @Description:
 * @Date: 2020/8/31 0031 23:02
 */
//步骤4
public class Phone {

    //充电
    public void charging(IVoltage5V iVoltage5V) {
        if (iVoltage5V.output5V() == 5) {
            System.out.println("电压为 5V, 可以充电~~");
        } else if (iVoltage5V.output5V() > 5) {
            System.out.println("电压大于 5V, 不能充电~~");
        }
    }
}
